<h2>Managing User</h2>

<div class="actionBar">
    [<?php echo CHtml::link('User List',array('list')); ?>]
    [<?php echo CHtml::link('New User',array('create')); ?>]
</div>

<table class="dataGrid">
    <thead>
        <tr>
            <th class="action_column">Actions</th>
            <th><?php echo $sort->link('id'); ?></th>
            <th><?php echo $sort->link('language_id'); ?></th>
            <th><?php echo $sort->link('status'); ?></th>
            <th><?php echo $sort->link('action_ts'); ?></th>
            <th><?php echo $sort->link('nickname'); ?></th>
            <th><?php echo $sort->link('email'); ?></th>
            <th><?php echo $sort->link('first_name'); ?></th>
            <th><?php echo $sort->link('last_name'); ?></th>
            <th><?php echo $sort->link('birthdate'); ?></th>
            <th><?php echo $sort->link('timezone_ofs'); ?></th>
            <th><?php echo $sort->link('gender'); ?></th>
            <th><?php echo $sort->link('reg_date'); ?></th>
            <th><?php echo $sort->link('signature'); ?></th>
            <th><?php echo $sort->link('home_page_url'); ?></th>
            <th><?php echo $sort->link('avatar'); ?></th>
            <th>Description</th>
        </tr>
    </thead>
    <tbody>
        <?php foreach($models as $n=>$model): ?>
        <tr class="<?php echo $n%2?'even':'odd';?>">
            <td class="action_column">
                    <?php echo CHtml::link('Update',array('editprofile','id'=>$model->id)); ?>
                    <?php echo CHtml::linkButton('Restore',array(
                        'submit'=>'',
                        'params'=>array('command'=>'restore','id'=>$model->id)));?>
                    <?php echo CHtml::linkButton('Block',array(
                        'submit'=>'',
                        'params'=>array('command'=>'block','id'=>$model->id),
                        'confirm'=>"Are you sure to block #{$model->id}?")); ?>
                    <?php echo CHtml::linkButton('Delete',array(
                        'submit'=>'',
                        'params'=>array('command'=>'delete','id'=>$model->id),
                        'confirm'=>"Are you sure to delete #{$model->id}?")); ?>
                    <?php echo CHtml::linkButton('FullDelete',array(
                        'submit'=>'',
                        'params'=>array('command'=>'fulldelete','id'=>$model->id),
                        'confirm'=>"Are you sure to fulldelete #{$model->id}?")); ?>
            </td>
            <td><?php echo CHtml::link($model->id,array('show','id'=>$model->id)); ?></td>
            <td><?php echo CHtml::encode($model->language_id); ?></td>
            <td><?php echo CHtml::encode($model->status); ?></td>
            <td><?php echo CHtml::encode($model->action_ts); ?></td>
            <td><?php echo CHtml::encode($model->nickname); ?></td>
            <td><?php echo CHtml::encode($model->email); ?></td>
            <td><?php echo CHtml::encode($model->first_name); ?></td>
            <td><?php echo CHtml::encode($model->last_name); ?></td>
            <td><?php echo CHtml::encode($model->birthdate); ?></td>
            <td><?php echo CHtml::encode($model->timezone_ofs); ?></td>
            <td><?php echo CHtml::encode($model->gender); ?></td>
            <td><?php echo CHtml::encode($model->reg_date); ?></td>
            <td><?php echo CHtml::encode($model->signature); ?></td>
            <td><?php echo CHtml::encode($model->home_page_url); ?></td>
            <td><?php echo CHtml::encode($model->avatar); ?></td>
            <td><?php echo CHtml::encode($model->short_description); ?></td>
        </tr>
        <?php endforeach; ?>
    </tbody>
</table>
<br/>
<?php $this->widget('CLinkPager',array('pages'=>$pages)); ?>